package club.cearnach.api.annotation;

import club.cearnach.api.service.impl.MovieServiceImpl;
import club.cearnach.api.service.impl.MovieTypeServiceImpl;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Caching;

import java.lang.annotation.*;

/**
 * @author 阮胜
 * @date 2018/5/15 15:30
 */

@Caching(evict = {
        @CacheEvict(value = MovieServiceImpl.CACHE_MOVIE_NAME, allEntries = true),
        @CacheEvict(value = MovieTypeServiceImpl.CACHE_MOVIE_TYPE_NAME, allEntries = true)
})
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface CacheMovieTypeDelete {
}
